-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IBX-7502: Added file size validation for image asset field type #320
IBX-7502: Added file size validation for image asset field type #320
Conversation
ada6b9d
to
12ddb47
Compare
(int)$content->contentInfo->contentTypeId | ||
); | ||
|
||
if ($this->assetMapper->isAsset($content)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer an early return instead, if Content is not an asset and we cannot continue with validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed: 44d9fbb
Co-authored-by: Konrad Oboza <[email protected]>
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA Approved on Ibexa Commerce 4.6.0-dev.
v4.6
Ref: ibexa/content-forms#61
This PR adds file size validation to image asset field type definition, base on validation settings from ezimage field type. Currently validation is added as Symfony File validator in: https://github.com/ibexa/content-forms/blob/main/src/lib/Form/Type/FieldType/ImageAssetFieldType.php#L82-L86.
Checklist:
$ composer fix-cs
).@ibexa/engineering
).